<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>数组筛选2</title>
		<script type="text/javascript">
			var arr = [1, 2, 3, 4, 8, 10, 12, 11, 13];
			var arrnew = [];
//			通过arrnew.length自动获取数组的长度来实现
			for(var i = 0; i < arr.length; i++) {
				if(arr[i] >= 10) {
					arrnew[arrnew.length] = arr[i]
				}
			}
			console.log(arrnew)
		</script>
	</head>

	<body>
	</body>

</html>